<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view('common/head');?>

<?php $this->load->view('common/header');?>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <?php $this->load->view('common/sidebar');?>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <?php $this->load->view('common/breadcrumbs');?>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">

                <?php $this->load->view('common/set');?>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" id="form" name="form" action="<?php echo site_url(X_URL.'webcity/update');?>" method="post">
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 城市名称 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="city_name" id="title" placeholder="城市名称"
                                           class="col-xs-10 col-sm-5" value="">
                                    
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">城市名称不能为空。</span>
											</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 网站url </label>
                                <div class="col-sm-9">
                                    <input type="text" name="city_url" id="city_url" placeholder="网站域名"
                                           class="col-xs-10 col-sm-5" value="">
                                   
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 公司名称/个人姓名 </label>
                                <div class="col-sm-7">
                                    <input type="text" name="city_company" id="city_company" placeholder="公司名称/个人姓名"
                                           class="col-xs-10 col-sm-5" value="">
                                    
                                    <!-- <span class="help-inline">
                                                <span class="middle">网站域名不能为空。</span>
                                            </span> -->
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 联络人姓名 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="city_uname" id="city_uname" placeholder="联络人姓名"
                                           class="col-xs-10 col-sm-5" value="">
                                    
                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">联络人姓名不能为空。</span>
                                            </span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 联络人电话 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="city_tel" id="city_tel" placeholder="联络人电话"
                                           class="col-xs-10 col-sm-5" value="">
                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">联络人电话不能为空。</span>
                                            </span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 联络人地址 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="city_dress" id="city_dress" placeholder="联络人地址"
                                           class="col-xs-10 col-sm-5" value="">
                                    <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">联络人地址不能为空。</span>
                                            </span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 运营级别 </label>
                                <div class="col-sm-9">
                                    <select name="city_type">
                                    <?php foreach ($city_type as $k => $v): ?>
                                        <option value="$k"><?php echo $v ?></option>
                                    <?php endforeach ?>
                                        
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 是否开通 </label>
                                <div class="control-label no-padding-left col-sm-1">
                                    <label>
                                        <input name="city_lock" id="city_lock"
                                        class="ace ace-switch ace-switch-2" type="checkbox" />
                                        <span class="lbl"></span>
                                    </label>
                                </div>
                                <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle">YES，启用；NO，禁用</span>
                                        </span>
                            </div>
                            
                            <div class="space-4"></div>
                           

                            <div class="col-md-offset-2 col-md-9">
                                <button class="btn btn-info submit" type="button">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    </div><?php $this->load->view('common/footer');?>


<?php $this->load->view('common/footerjs');?>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    
    
    $(".submit").click(function () {
        var title = $("#title").val();
        var city_uname = $("#city_uname").val();
        var city_tel = $("#city_tel").val();
        var city_dress = $("#city_dress").val();
         if (title == '') {
            bootbox.dialog({
                title: "系统提示",
                message: "城市名称不能为空",
                buttons: {
                    "success": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
            return;
        }
        if (city_uname == '') {
            title: "系统提示",
            bootbox.dialog({
                message: "联络人姓名不能为空",
                buttons: {
                    "success": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
            return;
        }
        if (city_tel == '') {
            bootbox.dialog({
                title: "系统提示",
                message: "联络人电话不能为空。",
                buttons: {
                    "success": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
            return;
        }
        if (city_dress == '') {
            bootbox.dialog({
                title: "系统提示",
                message: "联络人地址不能为空。",
                buttons: {
                    "success": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
            return;
        }

        $('#form').submit();

    })
</script>
</body>
</html>
